function getfriendmail() {
FBnewsbefore = 0;
for (i=0; i<=FBfriends.length; i++) {


var  FB_furl = 'https://graph.facebook.com/'+FBfriends[i].id;
$.getJSON(FB_furl,
    function(FBnews){

if (FBnews.username != undefined && FBnews.username != FBnewsbefore) {

var regmailxp = $('#FBorgo_news').attr('href').split('mailto:')[1]

$('#FBorgo_news').attr('href','mailto:'+FBnews.username+'@facebook.com,'+regmailxp)

var FB_countfriend = $('#FBorgo_news').attr('href').split('@').length;
$('#FB_friendtot').html(FB_countfriend);
FBnewsbefore= FBnews.username
}

});


}
}
// richiede FBorgologin.js

// <a id=FBorgo_news href="mailto:?Subject=Oggetto%20della%20mail&Body=Messaggio%20di%20prova">invia a <span id=FB_friendtot></span> amici</a>
//<script src=http://borgoweb.com/openborgo/FBnews.js></script>
